export const barOptions1 = {
  grid: {
    top: "10%",
    left: "1%",
    right: "0%",
    bottom: "3%",
    containLabel: true
  },
  color: ["#0084ff","#ffa600","#00ff9d"],
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'cross',
      crossStyle: {
        color: '#00ff9d'
      }
    }
  },
  legend: {
    data: ['电能耗', '设备故障', '电能成本']
  },
  xAxis: [
    {
      type: 'category',
      data: ['2022-03', '2022-04', '2022-05', '2023-06', '2022-07','2022-08', '2022-09', '2022-10', '2022-11', '2022-12', '2023-01', '2023-02'],
      axisPointer: {
        type: 'shadow'
      }
    }
  ],
  yAxis: [
    {
      type: 'value',
      // name: 'Precipitation',
      min: 0,
      max: 250,
      interval: 50,
      axisLabel: {
        formatter: '{value} Kwh'//ml
      }
    },
    {
      type: 'value',
      // name: 'Temperature',
      min: 0,
      max: 25,
      interval: 5,
      axisLabel: {
        formatter: '{value}  '
      }
    }
  ],
  series: [
    {
      name: '电能耗',
      type: 'bar',
      barGap:'0',
      tooltip: {
        valueFormatter: function (value) {
          return value + ' Kwh';
        }
      },
      data: [
        2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
      ]
    },
    {
      name: '设备故障',
      type: 'bar',
      tooltip: {
        valueFormatter: function (value) {
          return value + ' 次';
        }
      },
      data: [
        2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
      ]
    },
    {
      name: '电能成本',
      type: 'line',
      yAxisIndex: 1,
      tooltip: {
        valueFormatter: function (value) {
          return value + ' ';
        }
      },
      data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
    }
  ]
};

export const barOptions2 = {
  grid: {
    top: "10%",
    left: "1%",
    right: "0%",
    bottom: "3%",
    containLabel: true
  },
  color: ["#02d1ce","#ff9900"],
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'cross',
      crossStyle: {
        color: '#999'
      }
    }
  },
  legend: {
    data: ['水能耗',  '水能成本']
  },
  xAxis: [
    {
      type: 'category',
      data: ['2022-03', '2022-04', '2022-05', '2023-06', '2022-07','2022-08', '2022-09', '2022-10', '2022-11', '2022-12', '2023-01', '2023-02'],
      axisPointer: {
        type: 'shadow'
      }
    }
  ],
  yAxis: [
    {
      type: 'value',
      // name: 'Precipitation',
      min: 0,
      max: 250,
      interval: 50,
      axisLabel: {
        formatter: '{value} '
      }
    },
    {
      type: 'value',
      // name: 'Temperature',
      min: 0,
      max: 25,
      interval: 5,
      axisLabel: {
        formatter: '{value} '
      }
    }
  ],
  series: [
    {
      name: '水能耗',
      type: 'bar',
      tooltip: {
        valueFormatter: function (value) {
          return value + ' ';
        }
      },
      data: [
        2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
      ]
    },
    {
      name: '水能成本',
      type: 'line',
      yAxisIndex: 1,
      tooltip: {
        valueFormatter: function (value) {
          return value + ' ';
        }
      },
      data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
    }
  ]
};
export const barOptions3 = {
  color: ["#00B09E"],
  grid: {
    top: "4%",
    left: "1%",
    right: "0%",
    bottom: "3%",
    containLabel: true
  },
  xAxis: {
    type: "category",
    data: [
      "2020-10",
      "2020-11",
      "2020-12",
      "2021-01",
      "2021-02",
      "2021-03",
      "2021-04",
      "2021-05",
      "2021-06",
      "2021-07",
      "2021-08",
      "2021-09"
    ]
  },
  tooltip: {
    show: true
  },
  yAxis: {
    type: "value"
  },
  series: [
    {
      data: [120, 150, 80, 70, 110, 130, 240, 150, 184, 196, 235, 210, 223],
      type: "bar"
    }
  ]
};

export const barOptions4 = {
  grid: {
    top: "4%",
    left: "1%",
    right: "0%",
    bottom: "3%",
    containLabel: true
  },
  color: ["#ff9f5d"],
  xAxis: {
    type: "category",
    data: ["2016", "2017", "2018", "2019", "2020", "2021"]
  },
  tooltip: {
    show: true
  },
  yAxis: {
    type: "value"
  },
  series: [
    {
      data: [1400, 2300, 2000, 1869, 1569, 1321],
      type: "bar"
    }
  ]
};
